function ret = lecuyer_rand()
	global lecuyer_seed1;
	global lecuyer_seed2;

	lecuyer_seed1 = mod(40014*lecuyer_seed1,2147483563);
	lecuyer_seed2 = mod(40014*lecuyer_seed2,2147483399);

	x = mod( lecuyer_seed1 - lecuyer_seed2, 2147483562 );

	if ( x > 0 )
		ret = x/2147483563;
	else
		ret = 2147483562/2147483563;
	endif
endfunction

